package com.ruoyi.check.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.check.mapper.ECheckListFormItemMapper;
import com.ruoyi.check.domain.ECheckListFormItem;
import com.ruoyi.check.service.IECheckListFormItemService;

/**
 * 检点子项Service业务层处理
 *
 * @author hugh.sun
 * @date 2023-03-23
 */
@Service
public class ECheckListFormItemServiceImpl implements IECheckListFormItemService
{
    @Autowired
    private ECheckListFormItemMapper eCheckListFormItemMapper;

    /**
     * 查询检点子项
     *
     * @param id 检点子项主键
     * @return 检点子项
     */
    @Override
    public ECheckListFormItem selectECheckListFormItemById(Long id)
    {
        return eCheckListFormItemMapper.selectECheckListFormItemById(id);
    }

    /**
     * 查询检点子项列表
     *
     * @param eCheckListFormItem 检点子项
     * @return 检点子项
     */
    @Override
    public List<ECheckListFormItem> selectECheckListFormItemList(ECheckListFormItem eCheckListFormItem)
    {
        return eCheckListFormItemMapper.selectECheckListFormItemList(eCheckListFormItem);
    }

    /**
     * 新增检点子项
     *
     * @param eCheckListFormItem 检点子项
     * @return 结果
     */
    @Override
    public int insertECheckListFormItem(ECheckListFormItem eCheckListFormItem)
    {
        eCheckListFormItem.setCreateTime(DateUtils.getNowDate());
        return eCheckListFormItemMapper.insertECheckListFormItem(eCheckListFormItem);
    }

    /**
     * 修改检点子项
     *
     * @param eCheckListFormItem 检点子项
     * @return 结果
     */
    @Override
    public int updateECheckListFormItem(ECheckListFormItem eCheckListFormItem)
    {
        return eCheckListFormItemMapper.updateECheckListFormItem(eCheckListFormItem);
    }

    /**
     * 批量删除检点子项
     *
     * @param ids 需要删除的检点子项主键
     * @return 结果
     */
    @Override
    public int deleteECheckListFormItemByIds(Long[] ids)
    {
        return eCheckListFormItemMapper.deleteECheckListFormItemByIds(ids);
    }

    /**
     * 删除检点子项信息
     *
     * @param id 检点子项主键
     * @return 结果
     */
    @Override
    public int deleteECheckListFormItemById(Long id)
    {
        return eCheckListFormItemMapper.deleteECheckListFormItemById(id);
    }

    @Override
    public long maxid() {
        return eCheckListFormItemMapper.maxid();
    }

    @Override
    public  List<String > findLabel(String name) {

        return eCheckListFormItemMapper.findLabel(name);
    }

    @Override
    public List<ECheckListFormItem> findtimu(String name) {

        return eCheckListFormItemMapper.findtimu(name);
    }
}
